import React from 'react';
import PropTypes from 'prop-types';
import Bar from "./Bar";

class NavBar extends React.Component {
    render() {
        const {children} = this.props;
        console.log(typeof children, children);
        return (
            <div>
                <Bar bar={e => <h5 style={{color:"red"}}>{e}</h5>} />
            </div>
        );
    }
}

NavBar.propTypes = {
    children: PropTypes.element
}

export default NavBar